package nothing;

import java.util.Comparator;

import org.apache.log4j.Logger;
import nothing.model.RecipeNutrition;

public class RecipeNutritionComparator implements Comparator<RecipeNutrition> {
    static Logger log = Logger.getLogger(RecipeNutritionComparator.class);

    public RecipeNutritionComparator() {
    }
    
    public int compare(RecipeNutrition nut0, RecipeNutrition nut1) {
                
        if (nut0.getNutritionList().size() > nut1.getNutritionList().size()){
            return 1;
        }
        if (nut0.getNutritionList().size() < nut1.getNutritionList().size()){
            return -1;
        }
        return 0;
    }
            
}
